package dr.joketalker.dao;

import java.util.List;

public interface  GenericDAO<T> {

	abstract void setDebug(boolean a);
	abstract boolean isDebug();

	/** Persist the newInstance object into database */
    abstract Long create(T newInstance);

    /** Retrieve an object that was previously persisted to the database using
     *   the indicated id as primary key
     */
    abstract T read(long id);
    
    abstract List<T> readAll(long cid);
    
    abstract List<T> readAllWhere(String Column, String value,long cid);
    

    /** Save changes made to a persistent object.  */
    abstract void update(T transientObject);

    /** Remove an object from persistent storage in the database */
    abstract void delete(T persistentObject);

}
